var btnMixin = {
  data () {
    return {
      btnGroup: {
        btnData: [
          {
            name: "钉钉同步",
            type: "success",
            _name: "btn1"
          },
          {
            name: "数据同步",
            type: "warning",
            _name: "btn2"
          },
          {
            name: "手动添加",
            type: "info",
            _name: "btn3"
          }
        ],
        btnMethods: {
          btn1(){
            this.tabConfig.tableData.reverse()
          },
          btn2(){
            this.tabConfig.tableData.reverse()
          },
          btn3(){
            this.dialogVisible.sign = true
          }
        }
      }
    }
  }
}
var tabMixin = {
  data () {
    return {
      tabConfig: {
        tabStyle: {
          'background-color': '#409EFF',
          'color':'#fff',
          'border-bottom': '1px solid #c7c2c2',
          'text-align': 'center',
          'border-right': '1px solid #c7c2c2'
        },
        tabCount: [
          {
            type: "selection"
          },
          {
            prop: "date",
            label: "日期"
          },
          {
            prop: "name",
            label: "用户账号"
          },
          {
            prop: "address",
            label: "用户地址"
          },
        ],
        tableData: [{
          date: '2016-05-02',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1518 弄',
          zip: 200333,
          tag: '家'
        }, {
          date: '2016-05-04',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1517 弄',
          zip: 200333,
          tag: '公司'
        }, {
          date: '2016-05-01',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1519 弄',
          zip: 200333,
          tag: '家'
        }, {
          date: '2016-05-03',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1516 弄',
          zip: 200333,
          tag: '公司'
        }],
      } 
    }
  }
}
var formMixin = {
  data () {
    return {
      dialogVisible: {
        sign: false
      },
      formConfig: {
        form: [{
          value: "",
          name: "日期",
          _name: "date"
        },{
          value: "",
          name: "用户账号",
          _name: "name"
        },{
          value: "",
          name: "用户地址",
          _name: "address"
        }]
      }
    }
  }
}

export {
  btnMixin,
  tabMixin,
  formMixin
}